﻿@model VoiceAd.Models.tblDistrict
@using System.Data;
@using System.Linq;
@using System.Web.Mvc;
@using VoiceAd.Models;
@using VoiceAd.DAL;
@{
    ViewBag.Title = "Details District";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<h2>
    Details District</h2>
<fieldset>
    <legend>Thông tin</legend>
    <div class="display-label">
        Tỉnh/thành phố</div>
    <div class="display-field">
        @{
            IProvinceRepository provinceRepository = new ProvinceRepository(new dbVoiceAdDataContext());
            tblProvince tbl = provinceRepository.GetProvinceById(Convert.ToInt32(Model.ProvinceId));
            ViewBag.ProvinceName = tbl.ProvinceName;        
        }
        @Html.Raw(ViewBag.ProvinceName)
    </div>
    <div class="display-label">
        Quận/huyện</div>
    <div class="display-field">@Model.DistrictName</div>
</fieldset>
<p>
    @Html.ActionLink("Chỉnh sửa", "EditDistrict", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "District")
</p>
